const KoaRouter = require('koa-router')

const {verify} = require('../middleware/business.middleware')
const {
	register,
	approve,
	pass,
	findAllBusiness,
	update,
	remove,
	login,
} = require('../controller/business.controller')
const Business = require('../model/business.model')

const BusinessRouter = new KoaRouter({prefix:'/business'})

BusinessRouter.post('/register',verify,register)
BusinessRouter.post('/login',login)
BusinessRouter.get('/approve',approve)
BusinessRouter.patch('/pass',pass)
BusinessRouter.get('/findAllBusiness',findAllBusiness)
BusinessRouter.patch('/update',update)
BusinessRouter.post('/remove',remove)

module.exports = BusinessRouter